@extends('home.layout.index')
@section('content')
<div class="i_bg bg_color">
    <div class="i_ban_bg">
    <!--Begin Banner Begin-->
     <!--轮播开始-->
    <div class="banner">     
        <div class="top_slide_wrap">
            <ul class="slide_box bxslider">

                 @foreach($slide as $k=>$v)
                    <li><a href="{{url($v->url)}}"><img src="/{{$v->pic}}" width="900" height="401" /></a></li>
                @endforeach 
               
            </ul>   
            <div class="op_btns clearfix">
                <a href="#" class="op_btn op_prev"><span></span></a>
                <a href="#" class="op_btn op_next"><span></span></a>
            </div>        
        </div>
    </div>
</div>
</div>
    <script type="text/javascript">
    //var jq = jQuery.noConflict();
    (function(){
        $(".bxslider").bxSlider({
            auto:true,
            prevSelector:jq(".top_slide_wrap .op_prev")[0],nextSelector:jq(".top_slide_wrap .op_next")[0]
        });
    })();
    </script>
    <!--End Banner End--> 
    <!--轮播结束-->       
    
    <div class="content mar_10">
        <!--Begin 特卖 Begin-->
   
           
            
            <div class="brand_t">精品二手</div>
            <div>
            <ul class="p_sell" style="width:870px;">
            
              @foreach($goods as $k=>$v)
              @if($v->status == '出售中')
                <li> 
                    <div class="img"><img src="{{$v->pic}}" width="160" height="140" /></div>
                    <div class="name">{{$v->title}}</div>
                    <div class="price">
                        <table border="0" style="width:100%; color:#888888;" cellspacing="0" cellpadding="0">
                          <tr style="font-family:'宋体';">
                           
                            <td width="33%">成色</td>
                            <!-- <td width="33%">为您节省</td> -->
                          </tr>
                          <tr>

                            <td>@if($v->condition==0)九九新@elseif($v->condition==1)九成新@elseif($v->condition==2)八成新@elseif($v->condition==3)七成新@elseif($v->condition==4)垃圾成色@endif</td>

                            <!-- <td>￥100</td> -->
                          </tr>
                        </table>
                    </div>
                    <div class="ch_bg">
                        <span class="ch_txt">￥<font>{{$v->reprice}}</font></span>
                        <a href="./goods/{{$v->id}}" class="ch_a">查看</a>
                    </div>
                    <div class="times">发布时间：{{$v->ctime}}</div>
                </li>
             @endif
             @endforeach
          
            </ul>

    </div>   
             
        <!--End 特卖 End-->
        
         <div class="s_right">
            <div class="sell_ban">
                <div id="imgPlays">
                    <ul class="" id="actors">
                    <center>  
                        <a href="javascript:viod(0)">木鱼二手网</a>,木鱼,专业二手交易网站。<hr>
                        <img src="./home/juse/images/gonggao.jpg" alt="">
                        <table>
                        <tr>
                         <td>
                          <div id="visible">木鱼二手交易网站公告：<a href="javascript:viod(0)" id=hottext target="_blank"></a></div>
                         </td>
                        </tr>
                        </table>
                        <div id="incoming" style="DISPLAY: none">
                        <div id="AllNews">
                        <div id="1">
                        <div id="Summary">木鱼二手网，打造国内强无敌的二手交易网站！</div>
                        <div id="NewsLink"></div>
                        </div>
                        <div id="2">
                        <div id="Summary">专注网站二手交易，为二手交易爱好者提供交易平台。二手物品应有尽有,无所不有。只有你想不到的,没有我们没有的!</div>
                        <div id="NewsLink"></div>
                        </div>
                        <div id="3">
                        <div id="Summary">木鱼二手交易 你值得拥有！</div>
                        <div id="NewsLink"></div>
                        </div>
                        <div id="4">
                        <div id="Summary">muyu com 永远是最棒的！</div>
                        <div id="NewsLink"></div>
                        </div>
                        <div id="5">
                        <div id="Summary">木鱼欢迎你的来临！记住我们的网址 www muyu com！</div>
                        <div id="NewsLink"></div>
                        </div>
                        </div>
                        <div id="AddNews">
                        </div>
                        </div>
                    </ul>


                </div>   
            </div>

<script language=JAVAscript>
<!--
// ------ 定义全局变量
var theNewsNum;
var theAddNum;
var totalNum;
var CurrentPosion=0;
var theCurrentNews;
var theCurrentLength;
var theNewsText;
var theTargetLink;
var theCharacterTimeout;
var theNewsTimeout;
var theBrowserVersion;
var theWidgetOne;
var theWidgetTwo;
var theSpaceFiller;
var theLeadString;
var theNewsState;
function startTicker()
{
// ------ 设置初始数值
theCharacterTimeout = 50;//字符间隔时间
theNewsTimeout     = 2000;//新闻间隔时间
theWidgetOne        =  "_";//新闻前面下标符1
theWidgetTwo        =  "-";//新闻前面下标符
theNewsState       = 1;
//theNewsNum        = document.body.children.incoming.children.NewsNum.innerText;//新闻总条数
//add by lin
theNewsNum        = document.getElementById("incoming").children.AllNews.children.length;//新闻总条数
theAddNum        = document.getElementById("incoming").children.AddNews.children.length;//补充条数
totalNum   =theNewsNum+theAddNum;
theCurrentNews     = 0;
theCurrentLength    = 0;
theLeadString       = " ";
theSpaceFiller      = " ";
runTheTicker();
}
// --- 基础函数
function runTheTicker()
{
if(theNewsState == 1)
{
if(CurrentPosion<theNewsNum){
setupNextNews();
}
else{
setupAddNews();
}
CurrentPosion++;
if(CurrentPosion>=totalNum||CurrentPosion>=5) CurrentPosion=0;  //最多条数不超过5条
}
if(theCurrentLength != theNewsText.length)
{
drawNews();
}
else
{
closeOutNews();
}
}
// --- 跳转下一条新闻
function setupNextNews()
{
theNewsState = 0;
theCurrentNews = theCurrentNews % theNewsNum;
theNewsText = document.getElementById("AllNews").children[theCurrentNews].children.Summary.innerText;
theTargetLink = document.getElementById("AllNews").children[theCurrentNews].children.NewsLink.innerText;
theCurrentLength = 0;
document.all.hottext.href = theTargetLink;
theCurrentNews++;
}
function setupAddNews()
{
theNewsState = 0;
theCurrentNews = theCurrentNews % theAddNum;
theNewsText = document.getElementById("incoming").children.AddNews.children[theCurrentNews].children.Summary.innerText;
theTargetLink = document.getElementById("incoming").children.AddNews.children[theCurrentNews].children.NewsLink.innerText;
theCurrentLength = 0;
document.all.hottext.href = theTargetLink;
theCurrentNews++;
}
// --- 滚动新闻
function drawNews()
{
var myWidget;
if((theCurrentLength % 2) == 1)
{
myWidget = theWidgetOne;
}
else
{
myWidget = theWidgetTwo;
}
document.all.hottext.innerHTML = theLeadString + theNewsText.substring(0,theCurrentLength) + myWidget + theSpaceFiller;
theCurrentLength++;
setTimeout("runTheTicker()", theCharacterTimeout);
}
// --- 结束新闻循环
function closeOutNews()
{
document.all.hottext.innerHTML = theLeadString + theNewsText + theSpaceFiller;
theNewsState = 1;
setTimeout("runTheTicker()", theNewsTimeout);
}
window.onload=startTicker;
//-->
</script>
            <div class="sell_hot" style="height:780px;">
                <div class="s_hot_t">
                    <span class="fl">其它热销</span>
                   
                </div>
                <ul>
                @foreach($ad as $k=>$v)
                    <li><a href="{{url($v->url)}}"><img src="./{{$v->pic}}" width="320" height="118" /></a></li> 
                @endforeach
                </ul>
            </div>

            
            
</div>
    


   
@endsection